[llvm] r200454 - tools: repair Windows build
Saleem Abdulrasool
compnerd at compnerd.org
Wed Jan 29 21:20:31 PST 2014
Author: compnerd
Date: Wed Jan 29 23:20:31 2014
New Revision: 200454
URL: http://llvm.org/viewvc/llvm-project?rev=200454&view=rev
Log:
tools: repair Windows build
exp2 is not available on Windows. Fortunately, we are calculating powers of 2
with expontents within the range of [4,12]. Simply use an equivalent bitshift
operation to repair compilation with MSVC which does not provide this standard
function.
Modified:
llvm/trunk/tools/llvm-readobj/ARMAttributeParser.cpp
Modified: llvm/trunk/tools/llvm-readobj/ARMAttributeParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ARMAttributeParser.cpp?rev=200454&r1=200453&r2=200454&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ARMAttributeParser.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ARMAttributeParser.cpp Wed Jan 29 23:20:31 2014
@@ -321,7 +321,7 @@ void ARMAttributeParser::ABI_align_neede
if (Value < countof(Strings))
Description = StringRef(Strings[Value]);
else if (Value <= 12)
- Description = Twine("8-byte alignment, ") + utostr(exp2(Value))
+ Description = Twine("8-byte alignment, ") + utostr(1 << Value)
+ Twine("-byte extended alignment");
else
Description = "Invalid";
@@ -342,7 +342,7 @@ void ARMAttributeParser::ABI_align_prese
if (Value < countof(Strings))
Description = StringRef(Strings[Value]);
else if (Value <= 12)
- Description = Twine("8-byte stack alignment, ") + utostr(exp2(Value))
+ Description = Twine("8-byte stack alignment, ") + utostr(1 << Value)
+ Twine("-byte data alignment");
else
Description = "Invalid";
More information about the llvm-commits
mailing list