summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 00:34:30 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 00:34:30 +0000
commit4fd839b0da90963ac23edf79cd7e1fdd7f0e2cbc (patch)
treefbd313240b5d6d74fa79e407e7ff99f9ad9ea703 /llvm/lib/IR/DebugInfo.cpp
parentad87e54f1a2ed2192794bd4aef50cbe8536416e2 (diff)
downloadbcm5719-llvm-4fd839b0da90963ac23edf79cd7e1fdd7f0e2cbc.tar.gz
bcm5719-llvm-4fd839b0da90963ac23edf79cd7e1fdd7f0e2cbc.zip
AddDiscriminators: Create new MDLocation directly
I don't see a reason to add the `copyWithNewScope()` API over to `MDLocation` -- it seems to be a holdover from when creating locations required knowing details of operand layout -- so change `AddDiscriminators` to call `MDLocation::get()` directly. Should be no functionality change here. llvm-svn: 234824
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index fc302010b6e..a2d58fca67a 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -47,15 +47,6 @@ void DICompileUnit::replaceGlobalVariables(DIArray GlobalVariables) {
get()->replaceGlobalVariables(MDGlobalVariableArray(GlobalVariables));
}
-DILocation DILocation::copyWithNewScope(LLVMContext &Ctx,
- DILexicalBlockFile NewScope) {
- assert(NewScope && "Expected valid scope");
-
- const auto *Old = cast<MDLocation>(DbgNode);
- return DILocation(MDLocation::get(Ctx, Old->getLine(), Old->getColumn(),
- NewScope, Old->getInlinedAt()));
-}
-
unsigned DILocation::computeNewDiscriminator(LLVMContext &Ctx) {
std::pair<const char *, unsigned> Key(getFilename().data(), getLineNumber());
return ++Ctx.pImpl->DiscriminatorTable[Key];
OpenPOWER on IntegriCloud