diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-05-10 21:52:07 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-05-10 21:52:07 +0000 |
| commit | a1e813dcd4ecbfb74fd8ae010cfea1f71fd980d2 (patch) | |
| tree | 69ddcc44078dd0ec6fc6bf96ef23c0b98f9a9bb5 /llvm/lib/IR | |
| parent | 57abc5d6a6f393f488903c5a35e5a898fc201d3a (diff) | |
| download | bcm5719-llvm-a1e813dcd4ecbfb74fd8ae010cfea1f71fd980d2.tar.gz bcm5719-llvm-a1e813dcd4ecbfb74fd8ae010cfea1f71fd980d2.zip | |
PR14492: Debug Info: Support for values of non-integer non-type template parameters.
This is only tested for global variables at the moment (& includes tests
for the unnamed parameter case, since apparently this entire function
was completely untested previously)
llvm-svn: 181632
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index eb220b2349c..4bb87c9afb7 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -502,7 +502,7 @@ DIBuilder::createTemplateTypeParameter(DIDescriptor Context, StringRef Name, /// value parameter. DITemplateValueParameter DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name, - DIType Ty, uint64_t Val, + DIType Ty, Value *Val, MDNode *File, unsigned LineNo, unsigned ColumnNo) { Value *Elts[] = { @@ -510,7 +510,7 @@ DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name, getNonCompileUnitScope(Context), MDString::get(VMContext, Name), Ty, - ConstantInt::get(Type::getInt64Ty(VMContext), Val), + Val, File, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), ConstantInt::get(Type::getInt32Ty(VMContext), ColumnNo) diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 38fc90f865e..8a0fb8d5b10 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -695,6 +695,10 @@ DIArray DISubprogram::getVariables() const { return DIArray(); } +Value *DITemplateValueParameter::getValue() const { + return getField(DbgNode, 4); +} + void DIScope::setFilename(StringRef Name, LLVMContext &Context) { if (!DbgNode) return; |

