aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/DebugInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/DebugInfo.h')
-rw-r--r--include/llvm/Analysis/DebugInfo.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index ad824dd..41d8e14 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -271,8 +271,14 @@ namespace llvm {
bool isValid() const {
return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
}
- StringRef getFilename() const { return getCompileUnit().getFilename();}
- StringRef getDirectory() const { return getCompileUnit().getDirectory();}
+ StringRef getDirectory() const {
+ DIFile F = getFieldAs<DIFile>(3);
+ return F.getDirectory();
+ }
+ StringRef getFilename() const {
+ DIFile F = getFieldAs<DIFile>(3);
+ return F.getFilename();
+ }
/// replaceAllUsesWith - Replace all uses of debug info referenced by
/// this descriptor.