From b16f455e8ce98b2bb44b857299a3a329e4cf0962 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 3 Jun 2007 07:25:34 +0000 Subject: 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 --- clang/CodeGen/CodeGenFunction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/CodeGen/CodeGenFunction.cpp') 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)); -- cgit v1.2.3