[llvm-commits] [llvm] r56704 - in /llvm/trunk: include/llvm/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/

Dan Gohman gohman at apple.com
Sat Oct 4 11:33:52 PDT 2008


Hi Devang,

Something in the recent attribute changes is breaking
backwards compatibility with bitcocde files produced by
LLVM 2.2, and perhaps other versions, but that's what
I have handy at the moment.

If I take this testcase:


  define i32 @foo() {
          %t = call i32 @bar() nounwind readonly
          ret i32 %t
  }

  declare i32 @bar() nounwind readonly


Compiling with an LLVM 2.2 llvm-as and disassembling with a TOT
llvm-dis, I get this:


  define i32 @foo() {
          %t = call nounwind readonly i32 @bar() nounwind readonly
          ret i32 %t
  }

  declare nounwind readonly i32 @bar() nounwind readonly


TOT llvm-as doesn't like that:
  llvm-as: new.ll:4,0: new.ll:4: error: syntax error, unexpected NOUNWIND
while reading token: 'nounwind'

Also, TOT llvm-ld similarly doesn't like 2.2-produced bitcode files,
and gives this error:
  Attribute nounwind only applies to return values!
          %tmp7 = call nounwind i32 (...)* @atoi(i8* %tmp6) nounwind      
     ; <i32> [#uses=1]

Dan





More information about the llvm-commits mailing list