[llvm-commits] [llvm] r123038 - in /llvm/trunk: include/llvm-c/lto.h tools/lto/lto.cpp

Devang Patel dpatel at apple.com
Fri Jan 7 14:26:26 PST 2011


Author: dpatel
Date: Fri Jan  7 16:26:25 2011
New Revision: 123038

URL: http://llvm.org/viewvc/llvm-project?rev=123038&view=rev
Log:
Do not include DataTypes.h in llvm-c/lto.h.
This means avoid using uint32_t. This patch reverts r112200 and fixes original  problem by fixing argument type in lto.cpp.

Modified:
    llvm/trunk/include/llvm-c/lto.h
    llvm/trunk/tools/lto/lto.cpp

Modified: llvm/trunk/include/llvm-c/lto.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/lto.h?rev=123038&r1=123037&r2=123038&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/lto.h (original)
+++ llvm/trunk/include/llvm-c/lto.h Fri Jan  7 16:26:25 2011
@@ -18,7 +18,6 @@
 
 #include <stdbool.h>
 #include <stddef.h>
-#include "llvm/Support/DataTypes.h"
 
 #define LTO_API_VERSION 4
 
@@ -147,7 +146,7 @@
 /**
  * Returns the number of symbols in the object module.
  */
-extern uint32_t
+extern unsigned int
 lto_module_get_num_symbols(lto_module_t mod);
 
 
@@ -155,14 +154,14 @@
  * Returns the name of the ith symbol in the object module.
  */
 extern const char*
-lto_module_get_symbol_name(lto_module_t mod, uint32_t index);
+lto_module_get_symbol_name(lto_module_t mod, unsigned int index);
 
 
 /**
  * Returns the attributes of the ith symbol in the object module.
  */
 extern lto_symbol_attributes
-lto_module_get_symbol_attribute(lto_module_t mod, uint32_t index);
+lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index);
 
 
 /**

Modified: llvm/trunk/tools/lto/lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=123038&r1=123037&r2=123038&view=diff
==============================================================================
--- llvm/trunk/tools/lto/lto.cpp (original)
+++ llvm/trunk/tools/lto/lto.cpp Fri Jan  7 16:26:25 2011
@@ -132,7 +132,7 @@
 //
 // returns the number of symbols in the object module
 //
-uint32_t lto_module_get_num_symbols(lto_module_t mod)
+unsigned int lto_module_get_num_symbols(lto_module_t mod)
 {
     return mod->getSymbolCount();
 }
@@ -140,7 +140,7 @@
 //
 // returns the name of the ith symbol in the object module
 //
-const char* lto_module_get_symbol_name(lto_module_t mod, uint32_t index)
+const char* lto_module_get_symbol_name(lto_module_t mod, unsigned int index)
 {
     return mod->getSymbolName(index);
 }
@@ -150,7 +150,7 @@
 // returns the attributes of the ith symbol in the object module
 //
 lto_symbol_attributes lto_module_get_symbol_attribute(lto_module_t mod, 
-                                                      uint32_t index)
+                                                      unsigned int index)
 {
     return mod->getSymbolAttributes(index);
 }





More information about the llvm-commits mailing list