aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-05-19 14:44:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-05-19 14:44:42 +0000
commita24f6dfc90c6e9061f49b071f6e6efddbce416a4 (patch)
tree801ea987c28cadd71f27a811807f3d87d0c7dd92
parent922d0bcf8b764d23cbbd5ba88df53d8340ae9304 (diff)
downloadexternal_llvm-a24f6dfc90c6e9061f49b071f6e6efddbce416a4.zip
external_llvm-a24f6dfc90c6e9061f49b071f6e6efddbce416a4.tar.gz
external_llvm-a24f6dfc90c6e9061f49b071f6e6efddbce416a4.tar.bz2
Get the order of the hext digits right!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37261 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index b205ccc..1d97d5c 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -195,12 +195,12 @@ static std::string QuoteNameIfNeeded(const std::string &Name) {
} else {
needsQuotes = true;
result += "\\";
- char hex1 = C & 0x0F;
+ char hex1 = (C >> 4) & 0x0F;
if (hex1 < 10)
result += hex1 + '0';
else
result += hex1 - 10 + 'A';
- char hex2 = (C >> 4) & 0x0F;
+ char hex2 = C & 0x0F;
if (hex2 < 10)
result += hex2 + '0';
else