Преглед изворни кода

Remove unused functions from ASTWriter interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265857 91177308-0d34-0410-b5e6-96231b3b80d8
Richard Smith пре 9 година
родитељ
комит
3cf634973e
2 измењених фајлова са 11 додато и 26 уклоњено
  1. 3 18
      include/clang/Serialization/ASTWriter.h
  2. 8 8
      lib/Serialization/ASTWriter.cpp

+ 3 - 18
include/clang/Serialization/ASTWriter.h

@@ -593,15 +593,6 @@ public:
   /// \brief Emit a source range.
   /// \brief Emit a source range.
   void AddSourceRange(SourceRange Range, RecordDataImpl &Record);
   void AddSourceRange(SourceRange Range, RecordDataImpl &Record);
 
 
-  /// \brief Emit an integral value.
-  void AddAPInt(const llvm::APInt &Value, RecordDataImpl &Record);
-
-  /// \brief Emit a signed integral value.
-  void AddAPSInt(const llvm::APSInt &Value, RecordDataImpl &Record);
-
-  /// \brief Emit a floating-point value.
-  void AddAPFloat(const llvm::APFloat &Value, RecordDataImpl &Record);
-
   /// \brief Emit a reference to an identifier.
   /// \brief Emit a reference to an identifier.
   void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record);
   void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record);
 
 
@@ -869,19 +860,13 @@ public:
   }
   }
 
 
   /// \brief Emit an integral value.
   /// \brief Emit an integral value.
-  void AddAPInt(const llvm::APInt &Value) {
-    return Writer->AddAPInt(Value, *Record);
-  }
+  void AddAPInt(const llvm::APInt &Value);
 
 
   /// \brief Emit a signed integral value.
   /// \brief Emit a signed integral value.
-  void AddAPSInt(const llvm::APSInt &Value) {
-    return Writer->AddAPSInt(Value, *Record);
-  }
+  void AddAPSInt(const llvm::APSInt &Value);
 
 
   /// \brief Emit a floating-point value.
   /// \brief Emit a floating-point value.
-  void AddAPFloat(const llvm::APFloat &Value) {
-    return Writer->AddAPFloat(Value, *Record);
-  }
+  void AddAPFloat(const llvm::APFloat &Value);
 
 
   /// \brief Emit a reference to an identifier.
   /// \brief Emit a reference to an identifier.
   void AddIdentifierRef(const IdentifierInfo *II) {
   void AddIdentifierRef(const IdentifierInfo *II) {

+ 8 - 8
lib/Serialization/ASTWriter.cpp

@@ -4802,19 +4802,19 @@ void ASTWriter::AddSourceRange(SourceRange Range, RecordDataImpl &Record) {
   AddSourceLocation(Range.getEnd(), Record);
   AddSourceLocation(Range.getEnd(), Record);
 }
 }
 
 
-void ASTWriter::AddAPInt(const llvm::APInt &Value, RecordDataImpl &Record) {
-  Record.push_back(Value.getBitWidth());
+void ASTRecordWriter::AddAPInt(const llvm::APInt &Value) {
+  Record->push_back(Value.getBitWidth());
   const uint64_t *Words = Value.getRawData();
   const uint64_t *Words = Value.getRawData();
-  Record.append(Words, Words + Value.getNumWords());
+  Record->append(Words, Words + Value.getNumWords());
 }
 }
 
 
-void ASTWriter::AddAPSInt(const llvm::APSInt &Value, RecordDataImpl &Record) {
-  Record.push_back(Value.isUnsigned());
-  AddAPInt(Value, Record);
+void ASTRecordWriter::AddAPSInt(const llvm::APSInt &Value) {
+  Record->push_back(Value.isUnsigned());
+  AddAPInt(Value);
 }
 }
 
 
-void ASTWriter::AddAPFloat(const llvm::APFloat &Value, RecordDataImpl &Record) {
-  AddAPInt(Value.bitcastToAPInt(), Record);
+void ASTRecordWriter::AddAPFloat(const llvm::APFloat &Value) {
+  AddAPInt(Value.bitcastToAPInt());
 }
 }
 
 
 void ASTWriter::AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record) {
 void ASTWriter::AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record) {