aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-05-29 22:38:25 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-05-29 22:38:25 -0700
commitcfcccc95343088d7d73e0d7be1da5d4c5de57e49 (patch)
treebf9a01095ef9f77811e1f3fc68b6feee048cbe88 /lib/Analysis
parent69671d8bdefb36d637a20efae3f3e5cec297fb40 (diff)
Revert "Enable integer promotion pass and enable ABI check for integer types."
This reverts commit dc58e24a36836fc19c534bdcbef5152717a3c3fc. That change broke the build of the sandboxed PNaCl translator. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3360 TEST=PNaCl toolchain trybots TBR=dschuff@chromium.org Review URL: https://codereview.chromium.org/15845009
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/NaCl/PNaClABITypeChecker.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Analysis/NaCl/PNaClABITypeChecker.cpp b/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
index 5157747f2b..8501a4f9e2 100644
--- a/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
+++ b/lib/Analysis/NaCl/PNaClABITypeChecker.cpp
@@ -24,7 +24,7 @@ bool PNaClABITypeChecker::isValidType(const Type *Ty) {
if (VisitedTypes.count(Ty))
return VisitedTypes[Ty];
- unsigned Width;
+ // unsigned Width;
bool Valid = false;
switch (Ty->getTypeID()) {
// Allowed primitive types
@@ -48,9 +48,15 @@ bool PNaClABITypeChecker::isValidType(const Type *Ty) {
Valid = false;
break;
case Type::IntegerTyID:
- Width = cast<const IntegerType>(Ty)->getBitWidth();
- Valid = (Width == 1 || Width == 8 || Width == 16 ||
- Width == 32 || Width == 64);
+ // The check for integer sizes below currently does not pass on
+ // all NaCl tests because some LLVM passes introduce unusual
+ // integer sizes.
+ // TODO(mseaborn): Re-enable the check when it passes.
+ // See https://code.google.com/p/nativeclient/issues/detail?id=3360
+ Valid = true;
+ // Width = cast<const IntegerType>(Ty)->getBitWidth();
+ // Valid = (Width == 1 || Width == 8 || Width == 16 ||
+ // Width == 32 || Width == 64);
break;
case Type::FunctionTyID:
case Type::StructTyID: