diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 23:27:40 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-06 23:27:40 +0000 |
commit | e686f1591fde0d3394dd3be40d06281252f108fa (patch) | |
tree | 6f5e3ce7d39e4509af379d4bbe238e79e27ce2d6 /llvm/lib/Target | |
parent | 6186fb2cd008ea9445ebc1dddced644cdbaeead5 (diff) | |
download | bcm5719-llvm-e686f1591fde0d3394dd3be40d06281252f108fa.tar.gz bcm5719-llvm-e686f1591fde0d3394dd3be40d06281252f108fa.zip |
CodeGen: Stop using DIDescriptor::is*() and auto-casting
Same as r234255, but for lib/CodeGen and lib/Target.
llvm-svn: 234258
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp index 1b4483a5d8a..6896bcd701f 100644 --- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -371,7 +371,7 @@ void AArch64AsmPrinter::PrintDebugValueComment(const MachineInstr *MI, assert(NOps == 4); OS << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; // cast away const; DIetc do not take const operands for some reason. - DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps - 1).getMetadata())); + DIVariable V = cast<MDLocalVariable>(MI->getOperand(NOps - 2).getMetadata()); OS << V.getName(); OS << " <- "; // Frame address. Currently handles register +- offset only. diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index e3187a4dd8f..477d3c7a546 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -129,10 +129,7 @@ void NVPTXAsmPrinter::emitLineNumberAsDotLoc(const MachineInstr &MI) { if (!curLoc) return; - DIScope Scope(curLoc.getScope()); - - assert((!Scope || Scope.isScope()) && - "Scope of a DebugLoc should be null or a DIScope."); + DIScope Scope = cast_or_null<MDScope>(curLoc.getScope()); if (!Scope) return; |