summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Utils/Cloning.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-31 17:55:53 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-31 17:55:53 +0000
commit1e40dc42cd1bff905323186bc0184f260902f6dd (patch)
treea9edccf44043fa3f00b4749d6d818f0db364f556 /llvm/unittests/Transforms/Utils/Cloning.cpp
parent600aee98057e8657140713cd2a0dd6e5ff0247b8 (diff)
downloadbcm5719-llvm-1e40dc42cd1bff905323186bc0184f260902f6dd.tar.gz
bcm5719-llvm-1e40dc42cd1bff905323186bc0184f260902f6dd.zip
DI: Rewrite the DIBuilder local variable API
Replace the general `createLocalVariable()` with two more specific functions: `createParameterVariable()` and `createAutoVariable()`, and rewrite the documentation. Besides cleaning up the API, this avoids exposing the fake DWARF tags `DW_TAG_arg_variable` and `DW_TAG_auto_variable` to frontends, and is preparation for removing them completely. llvm-svn: 243764
Diffstat (limited to 'llvm/unittests/Transforms/Utils/Cloning.cpp')
-rw-r--r--llvm/unittests/Transforms/Utils/Cloning.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Transforms/Utils/Cloning.cpp b/llvm/unittests/Transforms/Utils/Cloning.cpp
index e2671499e81..3ceb84c42c7 100644
--- a/llvm/unittests/Transforms/Utils/Cloning.cpp
+++ b/llvm/unittests/Transforms/Utils/Cloning.cpp
@@ -255,8 +255,8 @@ protected:
auto *IntType =
DBuilder.createBasicType("int", 32, 0, dwarf::DW_ATE_signed);
auto *E = DBuilder.createExpression();
- auto *Variable = DBuilder.createLocalVariable(
- dwarf::DW_TAG_auto_variable, Subprogram, "x", File, 5, IntType, true);
+ auto *Variable =
+ DBuilder.createAutoVariable(Subprogram, "x", File, 5, IntType, true);
auto *DL = DILocation::get(Subprogram->getContext(), 5, 0, Subprogram);
DBuilder.insertDeclare(Alloca, Variable, E, DL, Store);
DBuilder.insertDbgValueIntrinsic(AllocaContent, 0, Variable, E, DL,
OpenPOWER on IntegriCloud