diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 | 
| commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
| tree | 4def12e759965de927d963ac65840d663ef9d1ea /lib/CodeGen/AsmPrinter/DebugLocEntry.h | |
| parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DebugLocEntry.h')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DebugLocEntry.h | 16 | 
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/lib/CodeGen/AsmPrinter/DebugLocEntry.h index b60ab9151ef2..20acd45e5720 100644 --- a/lib/CodeGen/AsmPrinter/DebugLocEntry.h +++ b/lib/CodeGen/AsmPrinter/DebugLocEntry.h @@ -11,11 +11,11 @@  #define LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H  #include "DebugLocStream.h" -#include "llvm/ADT/SmallString.h"  #include "llvm/IR/Constants.h"  #include "llvm/IR/DebugInfo.h"  #include "llvm/MC/MCSymbol.h"  #include "llvm/MC/MachineLocation.h" +#include "llvm/Support/Debug.h"  namespace llvm {  class AsmPrinter; @@ -76,6 +76,20 @@ public:      const DIExpression *getExpression() const { return Expression; }      friend bool operator==(const Value &, const Value &);      friend bool operator<(const Value &, const Value &); +    void dump() const { +      if (isLocation()) { +        llvm::dbgs() << "Loc = { reg=" << Loc.getReg() << " "; +        if (Loc.isIndirect()) +          llvm::dbgs() << '+' << Loc.getOffset(); +        llvm::dbgs() << "} "; +      } +      else if (isConstantInt()) +        Constant.CIP->dump(); +      else if (isConstantFP()) +        Constant.CFP->dump(); +      if (Expression) +        Expression->dump(); +    }    };  private:  | 
