Define(Defs, "__LDBL_MIN__", "3.36210314311209350626e-4932L");
}
+static const char* getI386VAListDeclaration() {
+ return "typedef char* __builtin_va_list;";
+}
+
+static const char* getX86_64VAListDeclaration() {
+ return
+ "typedef struct __va_list_tag {"
+ " unsigned gp_offset;"
+ " unsigned fp_offset;"
+ " void* overflow_arg_area;"
+ " void* reg_save_area;"
+ "} __builtin_va_list[1];";
+}
+
+static const char* getPPCVAListDeclaration() {
+ return
+ "typedef struct __va_list_tag {"
+ " unsigned char gpr;"
+ " unsigned char fpr;"
+ " unsigned short reserved;"
+ " void* overflow_arg_area;"
+ " void* reg_save_area;"
+ "} __builtin_va_list[1];";
+}
+
+
/// PPC builtin info.
namespace PPC {
enum {
unsigned &NumRecords) const {
PPC::getBuiltins(Records, NumRecords);
}
+ virtual const char *getVAListDeclaration() const {
+ return getPPCVAListDeclaration();
+ }
};
} // end anonymous namespace.
unsigned &NumRecords) const {
PPC::getBuiltins(Records, NumRecords);
}
+ virtual const char *getVAListDeclaration() const {
+ return getPPCVAListDeclaration();
+ }
};
} // end anonymous namespace.
unsigned &NumRecords) const {
X86::getBuiltins(Records, NumRecords);
}
+
+ virtual const char *getVAListDeclaration() const {
+ return getI386VAListDeclaration();
+ }
};
} // end anonymous namespace.
unsigned &NumRecords) const {
X86::getBuiltins(Records, NumRecords);
}
+ virtual const char *getVAListDeclaration() const {
+ return getX86_64VAListDeclaration();
+ }
};
} // end anonymous namespace.
unsigned &NumRecords) const {
X86::getBuiltins(Records, NumRecords);
}
+ virtual const char *getVAListDeclaration() const {
+ return getI386VAListDeclaration();
+ }
};
} // end anonymous namespace.
/// getVAListDeclaration - Return the declaration to use for
/// __builtin_va_list, which is target-specific.
- const char *getVAListDeclaration() const {
- // FIXME: dispatch to target impl.
- return "typedef char* __builtin_va_list;";
- }
+ const char *getVAListDeclaration() const;
+
///===---- Some helper methods ------------------------------------------===//
unsigned getCharWidth(SourceLocation Loc) {
/// "#define X Y\n".
virtual void getTargetDefines(std::vector<char> &Defines) const = 0;
+ /// getVAListDeclaration - Return the declaration to use for
+ /// __builtin_va_list, which is target-specific.
+ virtual const char *getVAListDeclaration() const = 0;
+
/// getWCharWidth - Return the size of wchar_t in bits.
///
void getWCharInfo(unsigned &Size, unsigned &Align) const {