aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-27 21:24:11 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-27 21:24:11 +0000
commite6d134b244cd666c47a3d2dd78f82ff0824188bd (patch)
tree4fe3759627ae12c12b914485f026ff266120d85b /lib/CodeGen/CGExpr.cpp
parent239cad79cb5be7a0b29f9e0883203695d40079a8 (diff)
Fix PR10204 in a better way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 5bdb016738..a3f8301578 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -791,9 +791,7 @@ RValue CodeGenFunction::EmitLoadOfLValue(LValue LV) {
return RValue::get(EmitARCLoadWeak(LV.getAddress()));
if (LV.isSimple()) {
- // Functions are l-values that don't require loading.
- if (LV.getType()->isFunctionType())
- return RValue::get(LV.getAddress());
+ assert(!LV.getType()->isFunctionType());
// Everything needs a load.
return RValue::get(EmitLoadOfScalar(LV));