[llvm-branch-commits] [clang] 577cf27 - [M68k] Update pointer data layout

2021-08-31 Thread Tom Stellard via llvm-branch-commits

Author: Ricky Taylor
Date: 2021-08-31T20:56:41-07:00
New Revision: 577cf27b78454e4201eea5c3d4513a7a71ae66df

URL: 
https://github.com/llvm/llvm-project/commit/577cf27b78454e4201eea5c3d4513a7a71ae66df
DIFF: 
https://github.com/llvm/llvm-project/commit/577cf27b78454e4201eea5c3d4513a7a71ae66df.diff

LOG: [M68k] Update pointer data layout

Fixes PR51626.

The M68k requires that all instruction, word and long word reads are
aligned to word boundaries. From the 68020 onwards, there is a
performance benefit from aligning long words to long word boundaries.

The M68k uses the same data layout for pointers and integers.

In line with this, this commit updates the pointer data layout to
match the layout already set for 32-bit integers: 32:16:32.

Differential Revision: https://reviews.llvm.org/D108792

(cherry picked from commit 8d3f112f0cdbed2311aead86bcd72e763ad55255)

Added: 


Modified: 
clang/lib/Basic/Targets/M68k.cpp
llvm/lib/Target/M68k/M68kTargetMachine.cpp

Removed: 




diff  --git a/clang/lib/Basic/Targets/M68k.cpp 
b/clang/lib/Basic/Targets/M68k.cpp
index 31cb36d37636..c0cd8fa90ed6 100644
--- a/clang/lib/Basic/Targets/M68k.cpp
+++ b/clang/lib/Basic/Targets/M68k.cpp
@@ -37,8 +37,8 @@ M68kTargetInfo::M68kTargetInfo(const llvm::Triple &Triple,
   // FIXME how to wire it with the used object format?
   Layout += "-m:e";
 
-  // M68k pointers are always 32 bit wide even for 16 bit cpus
-  Layout += "-p:32:32";
+  // M68k pointers are always 32 bit wide even for 16-bit CPUs
+  Layout += "-p:32:16:32";
 
   // M68k integer data types
   Layout += "-i8:8:8-i16:16:16-i32:16:32";

diff  --git a/llvm/lib/Target/M68k/M68kTargetMachine.cpp 
b/llvm/lib/Target/M68k/M68kTargetMachine.cpp
index 5b8fd3d41b14..cb7d8f8b25e3 100644
--- a/llvm/lib/Target/M68k/M68kTargetMachine.cpp
+++ b/llvm/lib/Target/M68k/M68kTargetMachine.cpp
@@ -49,10 +49,14 @@ std::string computeDataLayout(const Triple &TT, StringRef 
CPU,
   // FIXME how to wire it with the used object format?
   Ret += "-m:e";
 
-  // M68k pointers are always 32 bit wide even for 16 bit cpus
-  Ret += "-p:32:32";
-
-  // M68k requires i8 to align on 2 byte boundry
+  // M68k pointers are always 32 bit wide even for 16-bit CPUs.
+  // The ABI only specifies 16-bit alignment.
+  // On at least the 68020+ with a 32-bit bus, there is a performance benefit
+  // to having 32-bit alignment.
+  Ret += "-p:32:16:32";
+
+  // Bytes do not require special alignment, words are word aligned and
+  // long words are word aligned at minimum.
   Ret += "-i8:8:8-i16:16:16-i32:16:32";
 
   // FIXME no floats at the moment



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] d1dd1fb - [WebAssembly] Fix FastISel of condition in different block (PR51651)

2021-08-31 Thread Tom Stellard via llvm-branch-commits

Author: Nikita Popov
Date: 2021-08-31T20:58:25-07:00
New Revision: d1dd1fb104a68f365da67e4a8496e5e5c9b2ade9

URL: 
https://github.com/llvm/llvm-project/commit/d1dd1fb104a68f365da67e4a8496e5e5c9b2ade9
DIFF: 
https://github.com/llvm/llvm-project/commit/d1dd1fb104a68f365da67e4a8496e5e5c9b2ade9.diff

LOG: [WebAssembly] Fix FastISel of condition in different block (PR51651)

If the icmp is in a different block, then the register for the icmp
operand may not be initialized, as it nominally does not have
cross-block uses. Add a check that the icmp is in the same block
as the branch, which should be the common case.

This matches what X86 FastISel does:
https://github.com/llvm/llvm-project/blob/5b6b090cf2129228f05d7d0f504676b67f7524cf/llvm/lib/Target/X86/X86FastISel.cpp#L1648

The "not" transform that could have a similar issue is dropped
entirely, because it is currently dead: The incoming value is
a branch or select condition of type i1, but this code requires
an i32 to trigger.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51651.

Differential Revision: https://reviews.llvm.org/D108840

(cherry picked from commit 16086d47c0d0cd08ffae8e69a69c88653e654d01)

Added: 
llvm/test/CodeGen/WebAssembly/pr51651.ll

Modified: 
llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp

Removed: 




diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp 
b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
index 171d59ae4c6b..ae5108b0cb0d 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
@@ -157,7 +157,7 @@ class WebAssemblyFastISel final : public FastISel {
   void addLoadStoreOperands(const Address &Addr, const MachineInstrBuilder 
&MIB,
 MachineMemOperand *MMO);
   unsigned maskI1Value(unsigned Reg, const Value *V);
-  unsigned getRegForI1Value(const Value *V, bool &Not);
+  unsigned getRegForI1Value(const Value *V, const BasicBlock *BB, bool &Not);
   unsigned zeroExtendToI32(unsigned Reg, const Value *V,
MVT::SimpleValueType From);
   unsigned signExtendToI32(unsigned Reg, const Value *V,
@@ -418,20 +418,17 @@ unsigned WebAssemblyFastISel::maskI1Value(unsigned Reg, 
const Value *V) {
   return zeroExtendToI32(Reg, V, MVT::i1);
 }
 
-unsigned WebAssemblyFastISel::getRegForI1Value(const Value *V, bool &Not) {
+unsigned WebAssemblyFastISel::getRegForI1Value(const Value *V,
+   const BasicBlock *BB,
+   bool &Not) {
   if (const auto *ICmp = dyn_cast(V))
 if (const ConstantInt *C = dyn_cast(ICmp->getOperand(1)))
-  if (ICmp->isEquality() && C->isZero() && C->getType()->isIntegerTy(32)) {
+  if (ICmp->isEquality() && C->isZero() && C->getType()->isIntegerTy(32) &&
+  ICmp->getParent() == BB) {
 Not = ICmp->isTrueWhenEqual();
 return getRegForValue(ICmp->getOperand(0));
   }
 
-  Value *NotV;
-  if (match(V, m_Not(m_Value(NotV))) && V->getType()->isIntegerTy(32)) {
-Not = true;
-return getRegForValue(NotV);
-  }
-
   Not = false;
   unsigned Reg = getRegForValue(V);
   if (Reg == 0)
@@ -912,7 +909,8 @@ bool WebAssemblyFastISel::selectSelect(const Instruction 
*I) {
   const auto *Select = cast(I);
 
   bool Not;
-  unsigned CondReg = getRegForI1Value(Select->getCondition(), Not);
+  unsigned CondReg =
+  getRegForI1Value(Select->getCondition(), I->getParent(), Not);
   if (CondReg == 0)
 return false;
 
@@ -1312,7 +1310,7 @@ bool WebAssemblyFastISel::selectBr(const Instruction *I) {
   MachineBasicBlock *FBB = FuncInfo.MBBMap[Br->getSuccessor(1)];
 
   bool Not;
-  unsigned CondReg = getRegForI1Value(Br->getCondition(), Not);
+  unsigned CondReg = getRegForI1Value(Br->getCondition(), Br->getParent(), 
Not);
   if (CondReg == 0)
 return false;
 

diff  --git a/llvm/test/CodeGen/WebAssembly/pr51651.ll 
b/llvm/test/CodeGen/WebAssembly/pr51651.ll
new file mode 100644
index ..70ddcf07dc8e
--- /dev/null
+++ b/llvm/test/CodeGen/WebAssembly/pr51651.ll
@@ -0,0 +1,39 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -O0 -mtriple=wasm32-unknown-unknown -wasm-disable-explicit-locals 
-wasm-keep-registers < %s | FileCheck %s
+
+define i32 @test(i8* %p, i8* %p2) {
+; CHECK-LABEL: test:
+; CHECK: .functype test (i32, i32) -> (i32)
+; CHECK-NEXT:  # %bb.0:
+; CHECK-NEXT:i32.load8_u $3=, 0($0)
+; CHECK-NEXT:i32.eqz $2=, $3
+; CHECK-NEXT:i32.store8 0($1), $3
+; CHECK-NEXT:  # %bb.1: # %bb2
+; CHECK-NEXT:i32.const $4=, 1
+; CHECK-NEXT:i32.and $5=, $2, $4
+; CHECK-NEXT:block
+; CHECK-NEXT:br_if 0, $5 # 0: down to label0
+; CHECK-NEXT:  # %bb.2: # %bb4
+; CHECK-NEXT:i32.const $6=, 0
+; CHECK-NEXT:return $6
+; CHECK-NEXT:  .LBB0_3: # %bb3
+; CHECK-NEXT:end_block # label0:
+; C

[llvm-branch-commits] [openmp] ce268f0 - [libomptarget][amdgpu] don't declare Elf_Note on FreeBSD

2021-08-31 Thread Tom Stellard via llvm-branch-commits

Author: Dimitry Andric
Date: 2021-08-31T21:03:02-07:00
New Revision: ce268f0eb9e71679a3d57edd95fc54db6c16d8a9

URL: 
https://github.com/llvm/llvm-project/commit/ce268f0eb9e71679a3d57edd95fc54db6c16d8a9
DIFF: 
https://github.com/llvm/llvm-project/commit/ce268f0eb9e71679a3d57edd95fc54db6c16d8a9.diff

LOG: [libomptarget][amdgpu] don't declare Elf_Note on FreeBSD

On FreeBSD, the system `` already declares `struct Elf_Note`
indirectly (via ``). This results in compile errors
when building the libomptarget amdgpu plugin. Avoid redeclaring `struct
Elf_Note` on FreeBSD to fix the errors.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D107661

(cherry picked from commit 71ae2e0221a99958ed82175781d92a73ea05597c)

Added: 


Modified: 
openmp/libomptarget/plugins/amdgpu/impl/system.cpp

Removed: 




diff  --git a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp 
b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
index 7fd8d57737e9..d9cbf461121c 100644
--- a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
+++ b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp
@@ -35,6 +35,8 @@ typedef unsigned char *address;
 /*
  * Note descriptors.
  */
+// FreeBSD already declares Elf_Note (indirectly via )
+#if !defined(__FreeBSD__)
 typedef struct {
   uint32_t n_namesz; /* Length of note's name. */
   uint32_t n_descsz; /* Length of note's value. */
@@ -43,6 +45,7 @@ typedef struct {
   // then padding, optional
   // then desc, at 4 byte alignment (not 8, despite being elf64)
 } Elf_Note;
+#endif
 
 // The following include file and following structs/enums
 // have been replicated on a per-use basis below. For example,



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] d6a4814 - [SelectionDAG] Fix miscompile bugs related to smul.fix.sat with scale zero

2021-08-31 Thread Tom Stellard via llvm-branch-commits

Author: Bjorn Pettersson
Date: 2021-08-31T20:59:28-07:00
New Revision: d6a48141f28456878050301a528dd17166a71338

URL: 
https://github.com/llvm/llvm-project/commit/d6a48141f28456878050301a528dd17166a71338
DIFF: 
https://github.com/llvm/llvm-project/commit/d6a48141f28456878050301a528dd17166a71338.diff

LOG: [SelectionDAG] Fix miscompile bugs related to smul.fix.sat with scale zero

When expanding a SMULFIXSAT ISD node (usually originating from
a smul.fix.sat intrinsic) we've applied some optimizations for
the special case when the scale is zero. The idea has been that
it would be cheaper to use an SMULO instruction (if legal) to
perform the multiplication and at the same time detect any overflow.
And in case of overflow we could use some SELECT:s to replace the
result with the saturated min/max value. The only tricky part
is to know if we overflowed on the min or max value, i.e. if the
product is positive or negative. Unfortunately the implementation
has been incorrect as it has looked at the product returned by the
SMULO to determine the sign of the product. In case of overflow that
product is truncated and won't give us the correct sign bit.

This patch is adding an extra XOR of the multiplication operands,
which is used to determine the sign of the non truncated product.

This patch fixes PR51677.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D108938

(cherry picked from commit 789f01283d52065b10049b58a3288c4abd1ef351)

Added: 


Modified: 
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/smul_fix_sat.ll
llvm/test/CodeGen/X86/smul_fix_sat_constants.ll

Removed: 




diff  --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp 
b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index b8a3dd014901..328e9430d635 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -3464,8 +3464,11 @@ void DAGTypeLegalizer::ExpandIntRes_MULFIX(SDNode *N, 
SDValue &Lo,
 SDValue SatMin = DAG.getConstant(MinVal, dl, VT);
 SDValue SatMax = DAG.getConstant(MaxVal, dl, VT);
 SDValue Zero = DAG.getConstant(0, dl, VT);
-SDValue ProdNeg = DAG.getSetCC(dl, BoolVT, Product, Zero, ISD::SETLT);
-Result = DAG.getSelect(dl, VT, ProdNeg, SatMax, SatMin);
+// Xor the inputs, if resulting sign bit is 0 the product will be
+// positive, else negative.
+SDValue Xor = DAG.getNode(ISD::XOR, dl, VT, LHS, RHS);
+SDValue ProdNeg = DAG.getSetCC(dl, BoolVT, Xor, Zero, ISD::SETLT);
+Result = DAG.getSelect(dl, VT, ProdNeg, SatMin, SatMax);
 Result = DAG.getSelect(dl, VT, Overflow, Result, Product);
   } else {
 // For unsigned multiplication, we only need to check the max since we

diff  --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp 
b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 5e1786958b6f..7f80ce37e28a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -8155,8 +8155,11 @@ TargetLowering::expandFixedPointMul(SDNode *Node, 
SelectionDAG &DAG) const {
   APInt MaxVal = APInt::getSignedMaxValue(VTSize);
   SDValue SatMin = DAG.getConstant(MinVal, dl, VT);
   SDValue SatMax = DAG.getConstant(MaxVal, dl, VT);
-  SDValue ProdNeg = DAG.getSetCC(dl, BoolVT, Product, Zero, ISD::SETLT);
-  Result = DAG.getSelect(dl, VT, ProdNeg, SatMax, SatMin);
+  // Xor the inputs, if resulting sign bit is 0 the product will be
+  // positive, else negative.
+  SDValue Xor = DAG.getNode(ISD::XOR, dl, VT, LHS, RHS);
+  SDValue ProdNeg = DAG.getSetCC(dl, BoolVT, Xor, Zero, ISD::SETLT);
+  Result = DAG.getSelect(dl, VT, ProdNeg, SatMin, SatMax);
   return DAG.getSelect(dl, VT, Overflow, Result, Product);
 } else if (!Signed && isOperationLegalOrCustom(ISD::UMULO, VT)) {
   SDValue Result =

diff  --git a/llvm/test/CodeGen/X86/smul_fix_sat.ll 
b/llvm/test/CodeGen/X86/smul_fix_sat.ll
index 757763d407b2..105c21751420 100644
--- a/llvm/test/CodeGen/X86/smul_fix_sat.ll
+++ b/llvm/test/CodeGen/X86/smul_fix_sat.ll
@@ -315,11 +315,10 @@ define <4 x i32> @vec(<4 x i32> %x, <4 x i32> %y) 
nounwind {
 define i32 @func4(i32 %x, i32 %y) nounwind {
 ; X64-LABEL: func4:
 ; X64:   # %bb.0:
-; X64-NEXT:movl %edi, %ecx
-; X64-NEXT:imull %esi, %ecx
 ; X64-NEXT:xorl %eax, %eax
-; X64-NEXT:testl %ecx, %ecx
-; X64-NEXT:setns %al
+; X64-NEXT:movl %edi, %ecx
+; X64-NEXT:xorl %esi, %ecx
+; X64-NEXT:sets %al
 ; X64-NEXT:addl $2147483647, %eax # imm = 0x7FFF
 ; X64-NEXT:imull %esi, %edi
 ; X64-NEXT:cmovnol %edi, %eax
@@ -328,13 +327,12 @@ define i32 @func4(i32 %x, i32 %y) nounwind {
 ; X86-LABEL: func4:
 ; X86:   # 

[llvm-branch-commits] [compiler-rt] 65eb65c - [profile] Add static keyword to binary id functions

2021-08-31 Thread Tom Stellard via llvm-branch-commits

Author: Gulfem Savrun Yeniceri
Date: 2021-08-31T21:04:39-07:00
New Revision: 65eb65c694f55de1fb8387997dfa64bfcf666a6d

URL: 
https://github.com/llvm/llvm-project/commit/65eb65c694f55de1fb8387997dfa64bfcf666a6d
DIFF: 
https://github.com/llvm/llvm-project/commit/65eb65c694f55de1fb8387997dfa64bfcf666a6d.diff

LOG: [profile] Add static keyword to binary id functions

This patch adds static keyword to internal functions that write
binary id to restrict visibility to the file that they are declared.

Differential Revision: https://reviews.llvm.org/D108154

(cherry picked from commit 6c0e6f91d7f02cecdf11efb26050c48680a806ce)

Added: 


Modified: 
compiler-rt/lib/profile/InstrProfilingPlatformLinux.c

Removed: 




diff  --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c 
b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
index 7c15f97aff89..5d47083b8bfe 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
@@ -94,8 +94,8 @@ static size_t RoundUp(size_t size, size_t align) {
  * Write binary id length and then its data, because binary id does not
  * have a fixed length.
  */
-int WriteOneBinaryId(ProfDataWriter *Writer, uint64_t BinaryIdLen,
- const uint8_t *BinaryIdData) {
+static int WriteOneBinaryId(ProfDataWriter *Writer, uint64_t BinaryIdLen,
+const uint8_t *BinaryIdData) {
   ProfDataIOVec BinaryIdIOVec[] = {
   {&BinaryIdLen, sizeof(uint64_t), 1, 0},
   {BinaryIdData, sizeof(uint8_t), BinaryIdLen, 0}};
@@ -119,7 +119,8 @@ int WriteOneBinaryId(ProfDataWriter *Writer, uint64_t 
BinaryIdLen,
  * Note sections like .note.ABI-tag and .note.gnu.build-id are aligned
  * to 4 bytes, so round n_namesz and n_descsz to the nearest 4 bytes.
  */
-int WriteBinaryIdForNote(ProfDataWriter *Writer, const ElfW(Nhdr) * Note) {
+static int WriteBinaryIdForNote(ProfDataWriter *Writer,
+const ElfW(Nhdr) * Note) {
   int BinaryIdSize = 0;
 
   const char *NoteName = (const char *)Note + sizeof(ElfW(Nhdr));
@@ -144,8 +145,8 @@ int WriteBinaryIdForNote(ProfDataWriter *Writer, const 
ElfW(Nhdr) * Note) {
  * If writer is given, write binary ids into profiles.
  * If an error happens while writing, return -1.
  */
-int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note,
-   const ElfW(Nhdr) * NotesEnd) {
+static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note,
+  const ElfW(Nhdr) * NotesEnd) {
   int TotalBinaryIdsSize = 0;
   while (Note < NotesEnd) {
 int Result = WriteBinaryIdForNote(Writer, Note);



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] e7e20e1 - libclang: Document the soname change in the release notes

2021-08-31 Thread Sylvestre Ledru via llvm-branch-commits

Author: Sylvestre Ledru
Date: 2021-09-01T08:51:43+02:00
New Revision: e7e20e1eb66ad61f03f54103fd966c73ba99e7cb

URL: 
https://github.com/llvm/llvm-project/commit/e7e20e1eb66ad61f03f54103fd966c73ba99e7cb
DIFF: 
https://github.com/llvm/llvm-project/commit/e7e20e1eb66ad61f03f54103fd966c73ba99e7cb.diff

LOG: libclang: Document the soname change in the release notes

Differential Revision: https://reviews.llvm.org/D109023

Added: 


Modified: 
clang/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 4b6f4fe5e245b..ee899c204a891 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -308,7 +308,8 @@ clang-format
 libclang
 
 
-- ...
+- Make libclang SONAME independent from LLVM version. It will be updated only 
when
+  needed.
 
 Static Analyzer
 ---



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] 039d1a9 - [clang] Move the soname declaration in a variable at the top of the file

2021-08-31 Thread Sylvestre Ledru via llvm-branch-commits

Author: Sylvestre Ledru
Date: 2021-09-01T08:51:43+02:00
New Revision: 039d1a94b908d786965bf4fd35f9e933ca899719

URL: 
https://github.com/llvm/llvm-project/commit/039d1a94b908d786965bf4fd35f9e933ca899719
DIFF: 
https://github.com/llvm/llvm-project/commit/039d1a94b908d786965bf4fd35f9e933ca899719.diff

LOG: [clang] Move the soname declaration in a variable at the top of the file

Currently, it is a bit buried in the file even if this is
pretty important for distro.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D108533

Added: 


Modified: 
clang/tools/libclang/CMakeLists.txt

Removed: 




diff  --git a/clang/tools/libclang/CMakeLists.txt 
b/clang/tools/libclang/CMakeLists.txt
index 7148bdccfba48..bf88dca0a34b1 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -1,3 +1,9 @@
+# The SOVERSION should be updated only if a change is made to the libclang
+# ABI, and when it is updated, it should be updated to the current
+# LLVM_VERSION_MAJOR.
+# Please also see clang/tools/libclang/libclang.map
+set(CLANG_SONAME 13)
+
 set(SOURCES
   ARCMigrate.cpp
   BuildSystem.cpp
@@ -171,12 +177,9 @@ if(ENABLE_SHARED)
 set_property(SOURCE ARCMigrate.cpp APPEND PROPERTY
  OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libclang.map)
 
-# The SOVERSION should be updated only if a change is made to the libclang
-# ABI, and when it is updated, it should be updated to the current
-# LLVM_VERSION_MAJOR.
 set_target_properties(libclang PROPERTIES
   VERSION 
${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}
-  SOVERSION 13)
+  SOVERSION ${CLANG_SONAME})
   endif()
 endif()
 



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] d597db1 - libclang: also add a link to the announcement

2021-08-31 Thread Sylvestre Ledru via llvm-branch-commits

Author: Sylvestre Ledru
Date: 2021-09-01T08:56:50+02:00
New Revision: d597db1aebf282fa88d4359816f409d164054095

URL: 
https://github.com/llvm/llvm-project/commit/d597db1aebf282fa88d4359816f409d164054095
DIFF: 
https://github.com/llvm/llvm-project/commit/d597db1aebf282fa88d4359816f409d164054095.diff

LOG: libclang: also add a link to the announcement

Added: 


Modified: 
clang/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ee899c204a891..820253348a194 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -63,7 +63,7 @@ Non-comprehensive list of changes in this release
 -
 
 - The default value of _MSC_VER was raised from 1911 to 1914. MSVC 19.14 has 
the
-  support to overaligned objects on x86_32 which is required for some LLVM 
+  support to overaligned objects on x86_32 which is required for some LLVM
   passes.
 
 New Compiler Flags
@@ -309,7 +309,8 @@ libclang
 
 
 - Make libclang SONAME independent from LLVM version. It will be updated only 
when
-  needed.
+  needed. Defined in CLANG_SONAME (clang/tools/libclang/CMakeLists.txt).
+  `More details 
`_
 
 Static Analyzer
 ---



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits