summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/CMakeLists.txt1
-rw-r--r--clang/lib/AST/CharUnits.cpp24
2 files changed, 25 insertions, 0 deletions
diff --git a/clang/lib/AST/CMakeLists.txt b/clang/lib/AST/CMakeLists.txt
index 5aecf878c92..98880b5f77d 100644
--- a/clang/lib/AST/CMakeLists.txt
+++ b/clang/lib/AST/CMakeLists.txt
@@ -5,6 +5,7 @@ add_clang_library(clangAST
ASTConsumer.cpp
ASTContext.cpp
CXXInheritance.cpp
+ CharUnits.cpp
Decl.cpp
DeclBase.cpp
DeclCXX.cpp
diff --git a/clang/lib/AST/CharUnits.cpp b/clang/lib/AST/CharUnits.cpp
new file mode 100644
index 00000000000..4886cffbbcc
--- /dev/null
+++ b/clang/lib/AST/CharUnits.cpp
@@ -0,0 +1,24 @@
+//===--- CharUnits.cpp - Character units for sizes and offsets ------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the CharUnits class.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/CharUnits.h"
+
+#include "llvm/ADT/StringExtras.h"
+
+#include <string>
+
+using namespace clang;
+
+std::string CharUnits::toString() const {
+ return llvm::itostr(Quantity);
+}
OpenPOWER on IntegriCloud