summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2019-11-17 02:09:25 -0500
committerNico Weber <thakis@chromium.org>2019-11-17 02:09:25 -0500
commitc9276fbfdf0c7caf1576b2db562286d7cec7e53b (patch)
treeb584cd30cae5f36372ed6fd48cb2cc4abec54dfa /clang/lib/CodeGen/CodeGenModule.cpp
parentcc6b85390170725d2341416af2b2ab8ea6c25d83 (diff)
downloadbcm5719-llvm-c9276fbfdf0c7caf1576b2db562286d7cec7e53b.tar.gz
bcm5719-llvm-c9276fbfdf0c7caf1576b2db562286d7cec7e53b.zip
Revert "[NFC] Refactor representation of materialized temporaries"
This reverts commit 08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982. It broke ./ClangdTests/FindExplicitReferencesTest.All on the bots, see comments on https://reviews.llvm.org/D69360
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 768361d548d..e253bbc1991 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -5011,7 +5011,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary(
// If we're not materializing a subobject of the temporary, keep the
// cv-qualifiers from the type of the MaterializeTemporaryExpr.
QualType MaterializedType = Init->getType();
- if (Init == E->getSubExpr())
+ if (Init == E->GetTemporaryExpr())
MaterializedType = E->getType();
CharUnits Align = getContext().getTypeAlignInChars(MaterializedType);
@@ -5034,7 +5034,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary(
// temporary. Note that this might have a different value from the value
// computed by evaluating the initializer if the surrounding constant
// expression modifies the temporary.
- Value = E->getOrCreateValue(false);
+ Value = getContext().getMaterializedTemporaryValue(E, false);
}
// Try evaluating it now, it might have a constant initializer.
OpenPOWER on IntegriCloud