From 9fd9596d49dd54b3075c8335867d9a7f69415a69 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 22 Jan 2016 18:46:45 +0000 Subject: [PATCH] Fix a typo in r258507 and change the PCH dwoid constant to ~1UL. rdar://problem/24290667 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258519 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 2 +- lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 2 +- test/Modules/ExtDebugInfo.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 4e0cc3f857..635a2d06a2 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -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, diff --git a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 2178ec21c7..f20489275b 100644 --- a/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -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. diff --git a/test/Modules/ExtDebugInfo.cpp b/test/Modules/ExtDebugInfo.cpp index 189ebf016e..dfc8be53d1 100644 --- a/test/Modules/ExtDebugInfo.cpp +++ b/test/Modules/ExtDebugInfo.cpp @@ -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 -- 2.40.0