summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-03 07:25:34 +0000
committerChris Lattner <sabre@nondot.org>2007-06-03 07:25:34 +0000
commitb16f455e8ce98b2bb44b857299a3a329e4cf0962 (patch)
tree24995f97c951b8783a0ff2f5f7adb48841bd9ce8 /clang/CodeGen/CodeGenFunction.cpp
parentcf25024828679bc215766b52fcb7f201ddcffc37 (diff)
downloadbcm5719-llvm-b16f455e8ce98b2bb44b857299a3a329e4cf0962.tar.gz
bcm5719-llvm-b16f455e8ce98b2bb44b857299a3a329e4cf0962.zip
Type::isSignedInteger() and isUnsignedInteger() did not properly account for
'char', which varies based on the target. Instead of spreading target knowledge throughout the compiler, bifurcate char into Char_S and Char_U, and have ASTContext create the right one based on the target, when it starts up. llvm-svn: 39577
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/CodeGen/CodeGenFunction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp
index 9da66c635bd..57d9e8be660 100644
--- a/clang/CodeGen/CodeGenFunction.cpp
+++ b/clang/CodeGen/CodeGenFunction.cpp
@@ -51,7 +51,8 @@ const llvm::Type *CodeGenFunction::ConvertType(QualType T, SourceLocation Loc) {
case BuiltinType::Void:
// LLVM void type can only be used as the result of a function call. Just
// map to the same as char.
- case BuiltinType::Char:
+ case BuiltinType::Char_S:
+ case BuiltinType::Char_U:
case BuiltinType::SChar:
case BuiltinType::UChar:
return IntegerType::get(Target.getCharWidth(Loc));
OpenPOWER on IntegriCloud