diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-11-15 22:59:36 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-11-15 22:59:36 +0000 |
commit | 4201ddf3686b8c6a330ee1cc5959950309968e6e (patch) | |
tree | f89ca78da4af01662e26b2ccc14261ed66174781 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 6e72b8ba8ca78249469898b06463ab6c266eb19f (diff) | |
download | bcm5719-llvm-4201ddf3686b8c6a330ee1cc5959950309968e6e.tar.gz bcm5719-llvm-4201ddf3686b8c6a330ee1cc5959950309968e6e.zip |
DwarfCompileUnit: Push DIDescriptor usage out from isShareableAcrossCUs
This is the first of a few similar patches. We'll see how far it
goes/makes sense.
llvm-svn: 194871
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 1120279fe74..93de0185e4b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -99,11 +99,11 @@ int64_t CompileUnit::getDefaultLowerBound() const { } /// Check whether the DIE for this MDNode can be shared across CUs. -static bool isShareableAcrossCUs(const MDNode *N) { +static bool isShareableAcrossCUs(DIDescriptor D) { // When the MDNode can be part of the type system, the DIE can be // shared across CUs. - return DIDescriptor(N).isType() || - (DIDescriptor(N).isSubprogram() && !DISubprogram(N).isDefinition()); + return D.isType() || + (D.isSubprogram() && !DISubprogram(D).isDefinition()); } /// getDIE - Returns the debug information entry map slot for the @@ -111,7 +111,7 @@ static bool isShareableAcrossCUs(const MDNode *N) { /// when the DIE for this MDNode can be shared across CUs. The mappings /// will be kept in DwarfDebug for shareable DIEs. DIE *CompileUnit::getDIE(const MDNode *N) const { - if (isShareableAcrossCUs(N)) + if (isShareableAcrossCUs(DIDescriptor(N))) return DD->getDIE(N); return MDNodeToDieMap.lookup(N); } @@ -120,7 +120,7 @@ DIE *CompileUnit::getDIE(const MDNode *N) const { /// when the DIE for this MDNode can be shared across CUs. The mappings /// will be kept in DwarfDebug for shareable DIEs. void CompileUnit::insertDIE(const MDNode *N, DIE *D) { - if (isShareableAcrossCUs(N)) { + if (isShareableAcrossCUs(DIDescriptor(N))) { DD->insertDIE(N, D); return; } |