return RValue::get(EmitARCLoadWeak(LV.getAddress()));
if (LV.isSimple()) {
- assert(!LV.getType()->isFunctionType());
+ // Functions are l-values that don't require loading.
+ if (LV.getType()->isFunctionType())
+ return RValue::get(LV.getAddress());
// Everything needs a load.
return RValue::get(EmitLoadOfScalar(LV));
--- /dev/null
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s
+// PR10204
+static void loopback_VertexAttribI4ubv() {}
+
+void _mesa_loopback_init_api_table() {
+ (void) loopback_VertexAttribI4ubv;
+}