[cfe-commits] r39391 - in /cfe/cfe/trunk: Driver/Targets.cpp include/clang/Basic/TargetInfo.h
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:43:53 PDT 2007
Author: clattner
Date: Wed Jul 11 11:43:53 2007
New Revision: 39391
URL: http://llvm.org/viewvc/llvm-project?rev=39391&view=rev
Log:
wchar_t width is now expressed in terms of bits for uniformity.
Modified:
cfe/cfe/trunk/Driver/Targets.cpp
cfe/cfe/trunk/include/clang/Basic/TargetInfo.h
Modified: cfe/cfe/trunk/Driver/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/Targets.cpp?rev=39391&r1=39390&r2=39391&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/Targets.cpp (original)
+++ cfe/cfe/trunk/Driver/Targets.cpp Wed Jul 11 11:43:53 2007
@@ -378,7 +378,7 @@
public:
LinuxTargetInfo() {
// Note: I have no idea if this is right, just for testing.
- WCharWidth = 2;
+ WCharWidth = 16;
}
virtual void getTargetDefines(std::vector<std::string> &Defines) const {
Modified: cfe/cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=39391&r1=39390&r2=39391&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/cfe/trunk/include/clang/Basic/TargetInfo.h Wed Jul 11 11:43:53 2007
@@ -118,7 +118,7 @@
return 32;
}
- /// getWCharWidth - Return the size of wchar_t in bytes.
+ /// getWCharWidth - Return the size of wchar_t in bits.
///
unsigned getWCharWidth(SourceLocation Loc) {
if (!WCharWidth) ComputeWCharWidth(Loc);
@@ -151,9 +151,9 @@
/// not appropriate for the target.
class TargetInfoImpl {
protected:
- unsigned WCharWidth; /// sizeof(wchar_t) in bytes. Default value is 4.
+ unsigned WCharWidth; /// sizeof(wchar_t) in bits. Default value is 32.
public:
- TargetInfoImpl() : WCharWidth(4) {}
+ TargetInfoImpl() : WCharWidth(32) {}
virtual ~TargetInfoImpl() {}
/// getTargetDefines - Return a list of the target-specific #define values set
@@ -161,7 +161,7 @@
/// which results in '#define X 1' or "X=Y" which results in "#define X Y"
virtual void getTargetDefines(std::vector<std::string> &Defines) const = 0;
- /// getWCharWidth - Return the size of wchar_t in bytes.
+ /// getWCharWidth - Return the size of wchar_t in bits.
///
unsigned getWCharWidth() const { return WCharWidth; }
More information about the cfe-commits
mailing list