diff options
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 4 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/mangle-ms-templates.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index feb1fa30833..753b8174fb2 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -309,8 +309,8 @@ void MicrosoftCXXNameMangler::mangleNumber(const llvm::APSInt &Value) { return; } if (Value.uge(1) && Value.ule(10)) - (Value-llvm::APSInt(llvm::APInt(Value.getBitWidth(), 1, Value.isSigned()))).print(Out, - false); + (Value-llvm::APSInt(llvm::APInt(Value.getBitWidth(), 1, Value.isSigned()), + Value.isUnsigned())).print(Out, false); else { // We have to build up the encoding in reverse order, so it will come // out right when we write it out. diff --git a/clang/test/CodeGenCXX/mangle-ms-templates.cpp b/clang/test/CodeGenCXX/mangle-ms-templates.cpp index b8138727a5a..0a011b327e0 100644 --- a/clang/test/CodeGenCXX/mangle-ms-templates.cpp +++ b/clang/test/CodeGenCXX/mangle-ms-templates.cpp @@ -38,6 +38,9 @@ void template_mangling() { BoolTemplate<true> _true; // CHECK: call {{.*}} @"\01??0?$BoolTemplate@$00@@QAE@XZ" + IntTemplate<5> five; +// CHECK: call {{.*}} @"\01??0?$IntTemplate@$04@@QAE@XZ" + IntTemplate<11> eleven; // CHECK: call {{.*}} @"\01??0?$IntTemplate@$0L@@@QAE@XZ" |