]> granicus.if.org Git - clang/commitdiff
Fix a typo in r258507 and change the PCH dwoid constant to ~1UL.
authorAdrian Prantl <aprantl@apple.com>
Fri, 22 Jan 2016 18:46:45 +0000 (18:46 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 22 Jan 2016 18:46:45 +0000 (18:46 +0000)
rdar://problem/24290667

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258519 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/ObjectFilePCHContainerOperations.cpp
test/Modules/ExtDebugInfo.cpp

index 4e0cc3f8574edd4f8220c612d71cb28b0eafcad8..635a2d06a24ce497a0491f81c2ab31a8edafb3ba 100644 (file)
@@ -1742,7 +1742,7 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
   if (CreateSkeletonCU && IsRootModule) {
     // PCH files don't have a signature field in the control block,
     // but LLVM detects skeleton CUs by looking for a non-zero DWO id.
-    uint64_t Signature = Mod.getSignature() ? Mod.getSignature() : ~1U;
+    uint64_t Signature = Mod.getSignature() ? Mod.getSignature() : ~1UL;
     llvm::DIBuilder DIB(CGM.getModule());
     DIB.createCompileUnit(TheCU->getSourceLanguage(), Mod.getModuleName(),
                           Mod.getPath(), TheCU->getProducer(), true,
index 2178ec21c7a27ea63cb8cabcbc8cf0b3c44a4468..f20489275b26b8924dde0d333f6633b272cfa8f5 100644 (file)
@@ -222,7 +222,7 @@ public:
 
     // PCH files don't have a signature field in the control block,
     // but LLVM detects DWO CUs by looking for a non-zero DWO id.
-    uint64_t Signature = Buffer->Signature ? Buffer->Signature : ~1U;
+    uint64_t Signature = Buffer->Signature ? Buffer->Signature : ~1UL;
     Builder->getModuleDebugInfo()->setDwoId(Signature);
 
     // Finalize the Builder.
index 189ebf016eb58b891d9fb36281618a991cf87438..dfc8be53d1f3945c64462e6886eadcf0d50ad646 100644 (file)
@@ -18,7 +18,7 @@
 // RUN:     -triple %itanium_abi_triple \
 // RUN:     -include-pch %t.pch %s -emit-llvm -o %t-pch.ll %s
 // RUN: cat %t-pch.ll |  FileCheck %s
-
+// RUN: cat %t-pch.ll |  FileCheck %s --check-prefix=CHECK-PCH
 
 #ifdef MODULES
 @import DebugCXX;
@@ -109,3 +109,4 @@ void foo() {
 // CHECK: !DICompileUnit(
 // CHECK-SAME:           splitDebugFilename:
 // CHECK-SAME:           dwoId:
+// CHECK-PCH:            dwoId: 18446744073709551614