diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 00:34:30 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 00:34:30 +0000 |
commit | 4fd839b0da90963ac23edf79cd7e1fdd7f0e2cbc (patch) | |
tree | fbd313240b5d6d74fa79e407e7ff99f9ad9ea703 /llvm/lib/Transforms/Utils | |
parent | ad87e54f1a2ed2192794bd4aef50cbe8536416e2 (diff) | |
download | bcm5719-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/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/AddDiscriminators.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp index e8f1d5c83c6..4197e35f267 100644 --- a/llvm/lib/Transforms/Utils/AddDiscriminators.cpp +++ b/llvm/lib/Transforms/Utils/AddDiscriminators.cpp @@ -198,7 +198,9 @@ bool AddDiscriminators::runOnFunction(Function &F) { unsigned Discriminator = FirstDIL.computeNewDiscriminator(Ctx); DILexicalBlockFile NewScope = Builder.createLexicalBlockFile(Scope, File, Discriminator); - DILocation NewDIL = FirstDIL.copyWithNewScope(Ctx, NewScope); + DILocation NewDIL = + MDLocation::get(Ctx, FirstDIL->getLine(), FirstDIL->getColumn(), + NewScope, FirstDIL->getInlinedAt()); DebugLoc newDebugLoc = NewDIL.get(); // Attach this new debug location to First and every |