summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 02:09:32 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 02:09:32 +0000
commit32e7f2860b831b757ca5bae7a4d8a862ac761721 (patch)
treedddb531abb61d056034a72c4849ec3f0ee88dc4f /llvm/lib/IR/DebugInfo.cpp
parent571baebacb99a415f39acdaafe321eeb855a8407 (diff)
downloadbcm5719-llvm-32e7f2860b831b757ca5bae7a4d8a862ac761721.tar.gz
bcm5719-llvm-32e7f2860b831b757ca5bae7a4d8a862ac761721.zip
DebugInfo: Move DIVariable::printExtendedName() to its only caller
Move the local function `printDebugLoc()` along with it. llvm-svn: 234838
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index fe74ec51a0d..35c4f785b2b 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -349,41 +349,6 @@ void DIDescriptor::print(raw_ostream &OS) const {
get()->print(OS);
}
-static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS,
- const LLVMContext &Ctx) {
- if (!DL)
- return;
-
- DIScope Scope = cast<MDScope>(DL.getScope());
- // Omit the directory, because it's likely to be long and uninteresting.
- CommentOS << Scope.getFilename();
- CommentOS << ':' << DL.getLine();
- if (DL.getCol() != 0)
- CommentOS << ':' << DL.getCol();
-
- DebugLoc InlinedAtDL = DL.getInlinedAt();
- if (!InlinedAtDL)
- return;
-
- CommentOS << " @[ ";
- printDebugLoc(InlinedAtDL, CommentOS, Ctx);
- CommentOS << " ]";
-}
-
-void DIVariable::printExtendedName(raw_ostream &OS) const {
- const LLVMContext &Ctx = DbgNode->getContext();
- StringRef Res = getName();
- if (!Res.empty())
- OS << Res << "," << getLineNumber();
- if (auto *InlinedAt = get()->getInlinedAt()) {
- if (DebugLoc InlinedAtDL = InlinedAt) {
- OS << " @[";
- printDebugLoc(InlinedAtDL, OS, Ctx);
- OS << "]";
- }
- }
-}
-
template <>
DIDescriptor
DIRef<DIDescriptor>::resolve(const DITypeIdentifierMap &Map) const {
OpenPOWER on IntegriCloud