Skip to content

Commit d54a4d1

Browse files
committed
Remove conflicting ISO646 definitions
Add empty _Differentiation module
1 parent e141661 commit d54a4d1

File tree

7 files changed

+38
-0
lines changed

7 files changed

+38
-0
lines changed

include/swift/SIL/SILBuiltinVisitor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
#include "swift/SIL/SILInstruction.h"
2424
#include <type_traits>
2525

26+
// SWIFT_ENABLE_TENSORFLOW
27+
#undef and
28+
#undef or
29+
#undef xor
30+
// SWIFT_ENABLE_TENSORFLOW END
31+
2632
namespace swift {
2733

2834
template <typename ImplClass, typename ValueRetTy = void>

lib/AST/Builtins.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
#include "llvm/Support/ManagedStatic.h"
3131
#include <tuple>
3232

33+
// SWIFT_ENABLE_TENSORFLOW
34+
#undef and
35+
#undef or
36+
#undef xor
37+
// SWIFT_ENABLE_TENSORFLOW END
38+
3339
using namespace swift;
3440

3541
struct BuiltinExtraInfoTy {

lib/IRGen/GenBuiltin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
#include "IRGenModule.h"
3535
#include "LoadableTypeInfo.h"
3636

37+
// SWIFT_ENABLE_TENSORFLOW
38+
#undef and
39+
#undef or
40+
#undef xor
41+
// SWIFT_ENABLE_TENSORFLOW END
42+
3743
using namespace swift;
3844
using namespace irgen;
3945

lib/SIL/IR/SILModule.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
#include "llvm/Support/Debug.h"
3333
#include "llvm/Support/YAMLTraits.h"
3434
#include <functional>
35+
36+
// SWIFT_ENABLE_TENSORFLOW
37+
#undef and
38+
#undef or
39+
#undef xor
40+
// SWIFT_ENABLE_TENSORFLOW END
41+
3542
using namespace swift;
3643
using namespace Lowering;
3744

lib/SILGen/SILGenBuiltin.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
#include "swift/SIL/SILArgument.h"
3030
#include "swift/SIL/SILUndef.h"
3131

32+
// SWIFT_ENABLE_TENSORFLOW
33+
#undef and
34+
#undef or
35+
#undef xor
36+
// SWIFT_ENABLE_TENSORFLOW END
37+
3238
using namespace swift;
3339
using namespace Lowering;
3440

lib/SILOptimizer/Analysis/SimplifyInstruction.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
#include "swift/SILOptimizer/Analysis/ValueTracking.h"
2828
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
2929

30+
// SWIFT_ENABLE_TENSORFLOW
31+
#undef and
32+
#undef or
33+
#undef xor
34+
// SWIFT_ENABLE_TENSORFLOW END
35+
3036
using namespace swift;
3137
using namespace swift::PatternMatch;
3238

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// SWIFT_ENABLE_TENSORFLOW
22
// Empty Swift file, only for tensorflow branch.
33
// See explanation in stdlib/public/Differentiation/CMakeLists.txt.
4+
public struct _Differentiation { }

0 commit comments

Comments
 (0)