[APInt] Fix a few places that use APInt::getRawData to operate within the normal API.
getRawData exposes the internal type of the APInt class directly to its users. Ideally we wouldn't expose such an implementation detail.
This patch fixes a few of the easy cases by using truncate, extract, or a rotate.
llvm-svn: 301105
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index cac22af..00003b5 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -1949,8 +1949,7 @@
return true;
StringRef V = S.substr(2);
APInt A(V.size()*4, V, 16);
- Result = APInt(A.getActiveBits(),
- ArrayRef<uint64_t>(A.getRawData(), A.getNumWords()));
+ Result = A.zextOrTrunc(A.getActiveBits());
return false;
}