Add comment.
[oota-llvm.git] / lib / VMCore / Module.cpp
index e20dab30be99c4767c93463e13fe22a7b988301d..a6a859172b06b018f535f57d356bec24cc8984a7 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -46,7 +46,8 @@ GlobalVariable *ilist_traits<GlobalVariable>::createSentinel() {
   return Ret;
 }
 GlobalAlias *ilist_traits<GlobalAlias>::createSentinel() {
-  GlobalAlias *Ret = new GlobalAlias(Type::Int32Ty, GlobalValue::ExternalLinkage);
+  GlobalAlias *Ret = new GlobalAlias(Type::Int32Ty,
+                                     GlobalValue::ExternalLinkage);
   // This should not be garbage monitored.
   LeakDetector::removeGarbageObject(Ret);
   return Ret;
@@ -164,8 +165,8 @@ Constant *Module::getOrInsertFunction(const std::string &Name,
 
   // If the function exists but has the wrong type, return a bitcast to the
   // right type.
-  if (F->getType() != PointerType::get(Ty))
-    return ConstantExpr::getBitCast(F, PointerType::get(Ty));
+  if (F->getType() != PointerType::getUnqual(Ty))
+    return ConstantExpr::getBitCast(F, PointerType::getUnqual(Ty));
   
   // Otherwise, we just found the existing function or a prototype.
   return F;