Remove workarounds for unsupported compilers

Change-Id: Ie28ff761b0bae13c6ebdf7dd649cfbba28e0fc2c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2017-04-14 16:08:34 +03:00
committed by Orgad Shaneh
parent 531fba61f0
commit e1660a18cf
6 changed files with 5 additions and 48 deletions

View File

@@ -33,9 +33,7 @@
#include <string>
#include <cstdio> // for putchar
#if defined(_MSC_VER) && (_MSC_VER < 1800)
# define va_copy(dst, src) ((dst) = (src))
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
#if defined(__INTEL_COMPILER) && !defined(va_copy)
# define va_copy __va_copy
#endif

View File

@@ -32,9 +32,7 @@
#include <algorithm>
#include <utility>
#if defined(_MSC_VER) && (_MSC_VER < 1800)
# define va_copy(dst, src) ((dst) = (src))
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
#if defined(__INTEL_COMPILER) && !defined(va_copy)
# define va_copy __va_copy
#endif

View File

@@ -25,21 +25,9 @@
#include "Token.h"
#include "DiagnosticClient.h"
#include <cstdio>
#include <unordered_map>
#include <vector>
#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) \
|| (defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402))
#define USE_TR1
#endif
#if defined(_MSC_VER) && _MSC_VER < 1600
# include <map>
#elif defined(USE_TR1)
# include <tr1/unordered_map>
#else
# include <unordered_map>
#endif
namespace CPlusPlus {
class CPLUSPLUS_EXPORT TranslationUnit
@@ -185,14 +173,7 @@ private:
std::vector<Token> *_comments;
std::vector<unsigned> _lineOffsets;
std::vector<PPLine> _ppLines;
#if defined(_MSC_VER) && _MSC_VER < 1600
// MSVC2008 and earlier do not implement TR1.
typedef std::map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
#elif defined(USE_TR1)
typedef std::tr1::unordered_map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
#else
typedef std::unordered_map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
#endif
TokenLineColumn _expandedLineColumn;
MemoryPool *_pool;
AST *_ast;