[llvm] r293764 - [ARM] const cast fix for ARMAttributeParser test
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 04:58:58 PST 2017
Author: sam_parker
Date: Wed Feb 1 06:58:57 2017
New Revision: 293764
URL: http://llvm.org/viewvc/llvm-project?rev=293764&view=rev
Log:
[ARM] const cast fix for ARMAttributeParser test
GCC 4.8 produced a cast qualifier warning, so replaced with C++ style
const cast.
Modified:
llvm/trunk/unittests/Support/ARMAttributeParser.cpp
Modified: llvm/trunk/unittests/Support/ARMAttributeParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ARMAttributeParser.cpp?rev=293764&r1=293763&r2=293764&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ARMAttributeParser.cpp (original)
+++ llvm/trunk/unittests/Support/ARMAttributeParser.cpp Wed Feb 1 06:58:57 2017
@@ -26,12 +26,13 @@ struct AttributeSection {
};
bool testBuildAttr(unsigned Tag, unsigned Value,
- unsigned ExpectedTag, unsigned ExpectedValue) {
+ unsigned ExpectedTag, unsigned ExpectedValue) {
std::string buffer;
raw_string_ostream OS(buffer);
AttributeSection Section(Tag, Value);
Section.write(OS);
- ArrayRef<uint8_t> Bytes((uint8_t*)OS.str().c_str(), OS.str().size());
+ ArrayRef<uint8_t> Bytes(
+ reinterpret_cast<const uint8_t*>(OS.str().c_str()), OS.str().size());
ARMAttributeParser Parser;
Parser.Parse(Bytes, true);
More information about the llvm-commits
mailing list