[llvm-commits] [llvm] r94840 - /llvm/trunk/include/llvm/Support/IRReader.h

Jeffrey Yasskin jyasskin at google.com
Fri Jan 29 13:11:04 PST 2010


Author: jyasskin
Date: Fri Jan 29 15:11:04 2010
New Revision: 94840

URL: http://llvm.org/viewvc/llvm-project?rev=94840&view=rev
Log:
Rename two IRReader.h functions to indicate that they return a Module
that loads its contents lazily from bitcode.  I think these are the
only remaining mis-named functions.


Modified:
    llvm/trunk/include/llvm/Support/IRReader.h

Modified: llvm/trunk/include/llvm/Support/IRReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRReader.h?rev=94840&r1=94839&r2=94840&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/IRReader.h (original)
+++ llvm/trunk/include/llvm/Support/IRReader.h Fri Jan 29 15:11:04 2010
@@ -30,9 +30,9 @@
   /// which does lazy deserialization of function bodies.  Otherwise, attempt to
   /// parse it as LLVM Assembly and return a fully populated Module. This
   /// function *always* takes ownership of the given MemoryBuffer.
-  inline Module *getIRModule(MemoryBuffer *Buffer,
-                             SMDiagnostic &Err,
-                             LLVMContext &Context) {
+  inline Module *getLazyIRModule(MemoryBuffer *Buffer,
+                                 SMDiagnostic &Err,
+                                 LLVMContext &Context) {
     if (isBitcode((const unsigned char *)Buffer->getBufferStart(),
                   (const unsigned char *)Buffer->getBufferEnd())) {
       std::string ErrMsg;
@@ -53,9 +53,9 @@
   /// for it which does lazy deserialization of function bodies.  Otherwise,
   /// attempt to parse it as LLVM Assembly and return a fully populated
   /// Module.
-  inline Module *getIRFileModule(const std::string &Filename,
-                                 SMDiagnostic &Err,
-                                 LLVMContext &Context) {
+  inline Module *getLazyIRFileModule(const std::string &Filename,
+                                     SMDiagnostic &Err,
+                                     LLVMContext &Context) {
     std::string ErrMsg;
     MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrMsg);
     if (F == 0) {
@@ -64,7 +64,7 @@
       return 0;
     }
 
-    return getIRModule(F, Err, Context);
+    return getLazyIRModule(F, Err, Context);
   }
 
   /// If the given MemoryBuffer holds a bitcode image, return a Module





More information about the llvm-commits mailing list