diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-02-17 22:19:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-02-17 22:19:59 +0000 |
commit | 6f4746b11aedb9de22c1b5c0ae936690ff67a432 (patch) | |
tree | 11ec35c30a0a6863b4b88edb138743eb2c7726a9 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 984af07ae5f8a3110fa06a653ed01b56243233fa (diff) | |
download | bcm5719-llvm-6f4746b11aedb9de22c1b5c0ae936690ff67a432.tar.gz bcm5719-llvm-6f4746b11aedb9de22c1b5c0ae936690ff67a432.zip |
DbgVariable: Add an accessor for the common case of a single expression
belonging to a single DBG_VALUE instruction.
NFC
llvm-svn: 261167
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 9dd5040ce81..5febd9fb380 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -771,8 +771,7 @@ void DwarfCompileUnit::addComplexAddress(const DbgVariable &DV, DIE &Die, const MachineLocation &Location) { DIELoc *Loc = new (DIEValueAllocator) DIELoc; DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc); - assert(DV.getExpression().size() == 1); - const DIExpression *Expr = DV.getExpression().back(); + const DIExpression *Expr = DV.getSingleExpression(); bool ValidReg; if (Location.getOffset()) { ValidReg = DwarfExpr.AddMachineRegIndirect(Location.getReg(), |