[opaque pointer types] Push the passing of value types up from Function/GlobalVariabl...
[oota-llvm.git] / lib / IR / Function.cpp
index b50ad1262c69904f1cc40f534cf368671e554a32..7d150bfe89f4cd58449481186ea36f9341022e89 100644 (file)
@@ -248,7 +248,7 @@ void Function::eraseFromParent() {
 
 Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name,
                    Module *ParentModule)
-    : GlobalObject(PointerType::getUnqual(Ty), Value::FunctionVal,
+    : GlobalObject(Ty, Value::FunctionVal,
                    OperandTraits<Function>::op_begin(this), 0, Linkage, name),
       Ty(Ty) {
   assert(FunctionType::isValidReturnType(getReturnType()) &&