Skip to content

Commit

Permalink
fix some clang issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Oct 9, 2022
1 parent 7a7188d commit c001c7d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const char *x86::getX86TargetCPU(const ArgList &Args,

switch (Triple.getOS()) {
case llvm::Triple::FreeBSD:
case llvm::Triple::MidnightBSD:
return "i686";
case llvm::Triple::NetBSD:
case llvm::Triple::OpenBSD:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
switch (os) {
case llvm::Triple::CloudABI:
case llvm::Triple::FreeBSD:
case llvm::Triple::MidnightBSD:
case llvm::Triple::NetBSD:
case llvm::Triple::OpenBSD:
case llvm::Triple::NaCl:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ llvm::Optional<ProgramStateRef> MallocChecker::performKernelMalloc(
llvm::Triple::OSType OS = Ctx.getTargetInfo().getTriple().getOS();

if (!KernelZeroFlagVal.hasValue()) {
if (OS == llvm::Triple::FreeBSD)
if (OS == llvm::Triple::FreeBSD || OS == llvm::Triple::MidnightBSD)
KernelZeroFlagVal = 0x0100;
else if (OS == llvm::Triple::NetBSD)
KernelZeroFlagVal = 0x0002;
Expand Down

0 comments on commit c001c7d

Please sign in to comment.